<section class="logs">

  <button ng-show="logs.isFiltered()" class="reset btn btn-default pull-right" ng-click="logs.reset()">
    <i class="glyphicon glyphicon-repeat"></i>
    Reset filters
  </button>

  <h4 translate>logs.title</h4>

  <hr>

  <table class="table table-condensed">
    <thead>
      <tr>
        <th class="header-filter">
          <date model="logs.date"></date>
        </th>
        <th class="header-filter">
          <select class="pull-right form-control input-sm" ng-model="logs.admin">
            <option value="" translate>logs.allsender</option>
            <option ng-repeat="sender in logs.senders" value="{{::sender}}">{{::sender}}</option>
          </select>
          <span translate>logs.sender</span>
        </th>
        <th class="header-filter">
          <select class="pull-right form-control input-sm" ng-model="logs.target"
            ng-options="t.key as t.value for t in logs.targets" chosen>
          </select>
          <span translate>logs.target</span>
        </th>
        <th class="header-filter">
          <select class="pull-right form-control input-sm" ng-model="logs.type">
            <option value="" translate>logs.alltype</option>
            <option ng-repeat="type in logs.types" value="{{::type}}">{{::type}}</option>
          </select>
          <span translate>logs.type</span>
        </th>
      </tr>
    </thead>
    <tbody>
      <tr dir-paginate="log in logs.logs.logs | logs: logs.type:logs.admin:logs.target:logs.date | orderBy: '-date' | itemsPerPage: logs.itemsPerPage">
        <td>{{::log.date | date: 'mediumDate'}}
        <td>{{::log.admin}}
        <td>{{::log.target}}
        <td>{{::log.type}}
      </tr>
    </tbody>
  </table>

  <dir-pagination-controls></dir-pagination-controls>

</section>
